/**
 * 
 */
package br.edu.catolica.sadbc.entity.enums;

/**
 * @author robert.resende
 *
 */
public enum SituacaoUsuario {
	
	AGUARDANDO(0, "Aguardando"), 
	ATIVO(1, "Ativo"), 
	INATIVO(2, "Inativo");
	
	private Integer value;
	private String description;

	private SituacaoUsuario(Integer value, String description) {
		this.value = value;
		this.description = description;
	}

	public Integer getValue() {
		return this.value;
	}

	public String getDescription() {
		return this.description;
	}

	public static String getEnumDescription(Integer value) {
		for (SituacaoUsuario currentEnum : values()) {
			if (currentEnum.getValue().equals(value)) {
				return currentEnum.getDescription();
			}
		}
		return null;
	}

	public static SituacaoUsuario find(String roleName) {
		for (SituacaoUsuario currentEnum : values()) {
			if (currentEnum.getValue().equals(roleName)) {
				return currentEnum;
			}
		}
		return null;
	}

}
